package com.yangle.shell.bean;

import com.yangle.shell.enums.OrderStatusEnum;
import com.yangle.shell.enums.PayStatusEnum;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单对象
 * Author: yangle
 * Create Data: 2020/12/4
 */
@Data
@Entity
@DynamicUpdate
public class OrderMaster {
    @Id
    /**订单ID*/
    private String orderId;
    /**买家姓名*/
    private String buyerName;
    /**买家电话*/
    private String buyerPhone;
    /**买家地址*/
    private String buyerAddress;
    /**买家openid*/
    private String buyerOpenid;
    /**金额*/
    private BigDecimal orderAmount;
    /**订单状态，0新下单，1完成下单*/
    private Integer orderStatus = OrderStatusEnum.create.getCode();
    /**支付状态，0未支付1支付完成*/
    private Integer payStatus = PayStatusEnum.unPay.getCode();
    /**创建时间*/
    private Date createTime;
    /**修改时间*/
    private Date updateTime;
}
